<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="<?php echo U(index);?>" method="post">
        <input type="hidden" name="pageCurrent"     value="<?php echo ($pageCurrent); ?>"/>
        <input type="hidden" name="pageSize"        value="<?php echo ($pageSize); ?>"/>
        <input type="hidden" name="orderField"      value="<?php echo ($_REQUEST['orderField']); ?>"/>
        <input type="hidden" name="orderDirection"  value="<?php echo ($_REQUEST['orderDirection']); ?>"/>
        <div class="bjui-searchBar">
            <label>搜索：</label>
            <input type="text" value="<?php echo ((isset($searchname) && ($searchname !== ""))?($searchname):""); ?>" name="searchname" class="form-control" size="10" />&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>
            <a href="<?php echo U(add);?>" class="btn btn-green" data-id="Orderadd" data-toggle="navtab"  data-icon="plus">添加预约</a>
            <div class="pull-right">
                <a href="<?php echo U(del);?>" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids" class="btn btn-red">删除选中</a>
            </div>
        </div>
    </form>
    <div class="bjui-headBar">
        <label>统计数据</label>
        <label class="btn">总共:</label>
        <a href="">18141</a>
        <label class="btn">已到:</label>
        <a href="">8710</a>
        <label class="btn">未到:</label>
        <a href="">9431</a>
        <label class="btn">未到:</label>
        <a href="">30</a>
        <label class="btn">已到:</label>
        <a href="">39</a>
        <label class="btn">今日数据:</label>
        <a href="">69</a>
    </div>
</div>
<div class="bjui-pageContent">

    <table data-toggle="tablefixed" data-width="100%">
        <thead>
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>地区</th>
                <th>咨询</th>
                <th>科室</th>
                <th>部门</th>
                <th>媒体</th>
                <th>赴约</th>
                <th>客服</th>
                <th width="25">
                    <input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th width="40">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php if(empty($list)): ?><td colspan="8" class="text-center">aOh! 暂时还没有内容!</td>
                <?php else: ?>
                <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr <?php if($vo["status"] == 2 ): ?>class="red"<?php else: endif; ?>>
                    <td><?php echo ($key+1); ?></td>
                    <td><?php echo ($vo["name"]); ?></td>
                    <td><?php echo ($vo["sex"]); ?></td>
                    <td><?php echo ($vo["age"]); ?></td>
                    <td><?php echo ($vo["area"]); ?></td>
                    <td>
                        <span>内容:</span>
                        [阴道炎症] 13030236218外阴痒，处女推
                        <div class="divider"></div>
                        <br />
                        备注:2014-10-31 14:47 <br />张莉: 上午8-10点随诊
                        <br />
                        2014-11-01 08:10 德尚导医: 吴主任
                    </td>
                    <td><?php echo ($vo["dp"]); ?></td>
                    <td><?php echo ($vo["part_id"]); ?></td>
                    <td><?php echo ($vo["media_from"]); ?></td>
                    <td>
                        <?php if($vo["status"] == 2): ?>已到
                            <?php elseif($vo["status"] == 1): ?>
                            等待
                            <?php else: ?>
                            未到<?php endif; ?>
                        <br />
                        <?php echo (date("m-d:h:i",$vo["order_date"])); ?>
                    </td>
                    <td>
                        <?php echo ($vo["author"]); ?>
                        <br />
                        <?php echo (date("m-d:h:i:s",$vo["addtime"])); ?>
                    </td>
                    <td>
                        <input type="checkbox" name="ids" data-toggle="icheck" value="<?php echo ($vo["id"]); ?>"></td>
                    <td>
                        <a href="<?php echo U('view',array('id'=>$vo['id']));?>" class="btn btn-blue" data-icon="fa-indent" data-toggle="navtab" data-id="ordernavtab" title="查看" data-title="<?php echo ($vo["name"]); ?>" data-fresh="true"></a>
                        <a href="<?php echo U('edit',array('id'=>$vo['id']));?>" class="btn btn-green" data-icon="fa-edit" data-toggle="navtab" data-title="编辑<?php echo ($vo["name"]); ?>" data-id="editorder"style="margin:5px auto;" title="编辑"></a>
                        <a href="<?php echo U('del',array('ids'=>$vo['id']));?>" class="btn btn-orange " data-icon="fa-trash" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？" style="width:32px;" title="删除"></a>
                    </td>
                    </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="<?php echo ($pageSize); ?>"><?php echo ($pageSize); ?></option>
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="100">100</option>
            </select>
        </div>
        <span>共<?php echo ($total); ?>条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($total); ?>" data-page-size="<?php echo ($pageSize); ?>" data-page-current="<?php echo ($pageCurrent); ?>"></div>
</div>